package com.somegroovy;

import java.util.HashMap;

import groovy.util.GroovyTestCase;

class GreetingGeneratorTest extends GroovyTestCase {
	
	void testNonEmptyStringIsReturnedWhenSpeakIsCalled() {
		GreetingGenerator generator = new GreetingGenerator()
		
		def message = generator.speak()
		
		assert message != null;
	}
	
	void testGeneratorNeverSpeaksTheSameThingTwice() {
		GreetingGenerator generator = new GreetingGenerator();
		
		def message1 = generator.speak();
		
		def message2 = generator.speak();
		
		assertFalse message1.equals(message2);
	}
	
	void testSomething() {
		 def myMap = [a:1, b:2, c:3]
		
		println myMap
		
		myMap = [:]
		myMap['ok'] = 3
		
		println myMap
		
		
		assert myMap instanceof HashMap
		
	}
	
}